<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>login</title>
	<base href="<%=basePath%>" />  
	<style type="text/css">
		body { margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;overflow:hidden; }
		.mm{ color: #528311; font-size: 12px; }
		.tt{ height:18px; width:120px; border:solid 1px #cadcb2; font-size:12px; color:#81b432; }
		.copyRight { color: #42870a;font-size: 12px; }
		.tip{ font-size:12px; color:#FF0000;padding-left:10px; }
		.hand{cursor:pointer;}
	</style>
	<script type="text/javascript" src="admin/js/base/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="admin/js/base/plugin/jquery.cookie.js"></script>
</head>
<body>
<form action="account/admin/login" method="post">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e5f6cf">&nbsp;</td>
  </tr>
  <tr>
    <td height="608" background="admin/image/login/login_03.gif"><table width="862" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="266" background="admin/image/login/login_04.jpg">&nbsp;</td>
      </tr>
      <tr>
        <td height="95"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="424" height="95" background="admin/image/login/login_06.gif">&nbsp;</td>
            <td width="183" background="admin/image/login/login_07.gif" >
            <table width="100%" border="0" cellspacing="1" cellpadding="0" style="margin-top:-20px;">
              <tr>
                <td width="25%" height="30" align="right">
                <div ><span class="mm">用户名:</span></div></td>
                <td width="75%" height="30" >
                <input type="text"  class="tt"  id="username" name="username"/></td>
              </tr>
              <tr>
                <td height="30" align="right"><div ><span class="mm">密码:</span></div></td>
                <td height="30">
                <input type="password"  class="tt"  id="password" name="password"/></td>
              </tr>
               <tr>
                <td height="20" align="right"><input type="checkbox"  id="remember"  value="123"/></td>
                <td height="20" align="left"><div ><span class="mm">记住我</span></div></td>
              </tr>
              <tr>
                <td height="30">&nbsp;</td>
                <td height="30">&nbsp;
                <input type="submit"  id="login" style="display:none;"/> 
                <input type="button"  id="preLogin" value="登陆"  class="hand" />
                <input type="reset" value="重置"  class="hand"/>
                </td>
              </tr>
            </table></td>
            <td width="255" background="admin/image/login/login_08.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="247" valign="top" background="admin/image/login/login_09.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="22%" height="30">&nbsp;</td>
            <td width="56%">&nbsp;</td>
            <td width="22%">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44%" height="20"><span class="tip">${sessionScope.tip} </span></td>
                <td width="56%" class="copyRight">上海德立信息科技 版权所有 </td>
              </tr>
            </table></td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#a2d962">&nbsp;</td>
  </tr>
</table>
</form>
<script type="text/javascript">
	$(function(){
			$("#preLogin").click(function(){
				var _username= $("#username").val();
				var _password= $("#password").val();
				if($.trim(_username)==''||$.trim(_password)==''){
					$(".tip").html("用户名或密码不能为空！");
				}else{
					//alert($("#rememberUser").attr("checked"));
					if($("#remember").attr("checked")){
						$.cookie("username",_username,{ expires: 7 });
						$.cookie("password",_password, { expires: 7 });
					}
					$("#login").click();
				}
			});
			$("#username").val($.cookie("username"));
			$("#password").val($.cookie("password"));
	});

</script>
</body>
</html>
